package com.cn.xact.ty_treasured_book.activity;

import com.cn.xact.ty_treasured_book.R;
import com.cn.xact.ty_treasured_book.R.layout;
import com.cn.xact.ty_treasured_book.R.menu;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;

public class ExchangeResultActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_exchange_result);

        TextView tv = (TextView)findViewById(R.id.exchange_result);
        tv.setText(getIntent().getExtras().getString("result"));
        Button bt = (Button)findViewById(R.id.exchange_confirm);
        bt.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {
                ExchangeResultActivity.this.finish();
            }

        });

    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.exchange_result, menu);
        return true;
    }

}
